<?xml version="1.0" encoding="ISO-8859-1"?>
<xsd:schema
   targetNamespace="http://www.opengis.net/wfs-kvp/2.0"
   xmlns:wfs-kvp="http://www.opengis.net/wfs-kvp/2.0"
   xmlns:xsd="http://www.w3.org/2001/XMLSchema"
   elementFormDefault="qualified"
   version="1.1.0">
   <xsd:annotation>
      <xsd:documentation>
         This file defines the abstract schema of keyword-value pair
         encoding of WFS operations.  This is NOT the wire format.  
         The types in this file are meant to convery the structure.
      </xsd:documentation>
   </xsd:annotation>
   <xsd:simpleType name="CommaSeparatedList">
      <xsd:restriction base="xsd:string">
         <xsd:pattern
            value="\w(,\w)* |
                  '(' \w(,\w)* ')' |
                  '(' '(' \w(,\w)* ')' (,'(' \w(,\w)* ')')* ')' "/>
      </xsd:restriction>
   </xsd:simpleType>
   <xsd:simpleType name="BBoxType">
      <xsd:restriction base="xsd:string">
         <xsd:pattern value="(\d,\d)(,\d,\d)*"/>
      </xsd:restriction>
   </xsd:simpleType>
   <xsd:simpleType name="All_N_ValueType">
      <xsd:restriction base="xsd:string">
         <xsd:pattern value="ALL | \d"/>
      </xsd:restriction>
   </xsd:simpleType>
   <xsd:simpleType name="All_Some_ValueType">
      <xsd:restriction base="xsd:string">
         <xsd:enumeration value="ALL"/>
         <xsd:enumeration value="SOME"/>
      </xsd:restriction>
   </xsd:simpleType>
   <xsd:simpleType name="ResolveValueType">
      <xsd:restriction base="xsd:string">
         <xsd:enumeration value="local"/>
         <xsd:enumeration value="remote"/>
         <xsd:enumeration value="both"/>
         <xsd:enumeration value="none"/>
      </xsd:restriction>
   </xsd:simpleType>
   <!-- GETCAPABILITIES TYPE DEFINITION ================================= -->
   <xsd:complexType name="GetCapabilitiesType">
      <xsd:sequence>
         <xsd:element name="service" type="xsd:string" minOccurs="1"
            maxOccurs="1" fixed="WFS"/>
         <xsd:element name="request" type="xsd:string" minOccurs="1"
            maxOccurs="1" fixed="GetCapabilities"/>
         <xsd:element name="acceptversions" type="wfs-kvp:CommaSeparatedList"
            minOccurs="0"/>
         <xsd:element name="sections" type="wfs-kvp:CommaSeparatedList"
            minOccurs="0"/>
         <xsd:element name="updatesequence" type="xsd:string" minOccurs="0"/>
         <xsd:element name="acceptformats" type="wfs-kvp:CommaSeparatedList"
            minOccurs="0"/>
         <xsd:element name="namespace" type="wfs-kvp:CommaSeparatedList"
            minOccurs="0"/>
      </xsd:sequence>
   </xsd:complexType>
   <!-- DESCRIBEFEATURETYPE TYPE DEFINITION ============================== -->
   <xsd:complexType name="DescribeFeatureTypeRequestType">
      <xsd:sequence>
         <xsd:element name="service" type="xsd:string" minOccurs="1"
            maxOccurs="1" fixed="WFS"/>
         <xsd:element name="version" type="xsd:string" minOccurs="1"
            maxOccurs="1" fixed="2.0.0"/>
         <xsd:element name="request" type="xsd:string" minOccurs="1"
            maxOccurs="1" fixed="DescribeFeatureType"/>
         <xsd:element name="typeName" type="wfs-kvp:CommaSeparatedList"
            minOccurs="0"/>
         <xsd:element name="outputFormat" type="xsd:string" minOccurs="0"
            default="application/gml+xml; version=3.2"/>
         <xsd:element name="namespace" type="wfs-kvp:CommaSeparatedList"
            minOccurs="0"/>
      </xsd:sequence>
   </xsd:complexType>
   <!-- GETPROPERTYVALUE TYPE DEFINITION ================================== -->
   <xsd:complexType name="GetPropertyValueRequestType">
      <xsd:sequence>
         <xsd:element name="service" type="xsd:string" minOccurs="1"
            maxOccurs="1" fixed="WFS"/>
         <xsd:element name="version" type="xsd:string" minOccurs="1"
            maxOccurs="1" fixed="2.0.0"/>
         <xsd:element name="request" type="xsd:string" minOccurs="1"
            maxOccurs="1" fixed="GetPropertyValue"/>
         <xsd:element name="valuereference" type="xsd:string"/>
         <xsd:element name="count" type="xsd:positiveInteger" minOccurs="0"/>
         <xsd:element name="srsname" type="xsd:anyURI" minOccurs="0"/>
         <xsd:choice>
            <xsd:element name="resourceid" type="wfs-kvp:CommaSeparatedList"/>
            <xsd:sequence>
               <xsd:element name="typenames" type="xsd:string"/>
               <xsd:element name="aliases" type="wfs-kvp:CommaSeparatedList"
                  minOccurs="0"/>
               <xsd:choice>
                  <xsd:element name="filter" type="xsd:string"/>
                  <xsd:element name="bbox" type="wfs-kvp:BBoxType"/>
               </xsd:choice>
            </xsd:sequence>
         </xsd:choice>
         <xsd:element name="resolve" type="wfs-kvp:ResolveValueType"
            minOccurs="0" default="none"/>
         <xsd:element name="resolvePath" type="xsd:string" minOccurs="0"
            default="none"/>
         <xsd:element name="resolveDepth" type="xsd:string" minOccurs="0"
            default="*"/>
         <xsd:element name="resolveTimeout" type="xsd:positiveInteger"
            minOccurs="0" default="300"/>
         <xsd:element name="namespace" type="wfs-kvp:CommaSeparatedList"
            minOccurs="0"/>
      </xsd:sequence>
   </xsd:complexType>
   <!-- GETFEATURE TYPE DEFINITION ======================================== -->
   <xsd:complexType name="GetFeatureRequestType">
      <xsd:sequence>
         <xsd:element name="service" type="xsd:string" minOccurs="1"
            maxOccurs="1" fixed="WFS"/>
         <xsd:element name="version" type="xsd:string" minOccurs="1"
            maxOccurs="1" fixed="2.0.0"/>
         <xsd:element name="request" type="xsd:string" minOccurs="1"
            maxOccurs="1" fixed="GetFeature"/>
         <xsd:element name="outputFormat" type="xsd:string" minOccurs="0"
            default="application/gml+xml; version=3.2"/>
         <xsd:element name="count" type="xsd:positiveInteger"
            minOccurs="0"/>
         <xsd:element name="resulttype" minOccurs="0" default="results">
            <xsd:simpleType>
               <xsd:restriction base="xsd:string">
                  <xsd:enumeration value="results"/>
                  <xsd:enumeration value="hits"/>
               </xsd:restriction>
            </xsd:simpleType>
         </xsd:element>
         <xsd:element name="featureversion" type="wfs-kvp:All_N_ValueType"
            minOccurs="0"/>
         <xsd:element name="srsname" type="xsd:anyURI" minOccurs="0"/>
         <xsd:element name="propertyname" type="wfs-kvp:CommaSeparatedList"
            minOccurs="0"/>
         <xsd:choice>
            <xsd:element name="resourceid" type="wfs-kvp:CommaSeparatedList"/>
            <xsd:sequence>
               <xsd:element name="typenames" type="wfs-kvp:CommaSeparatedList"/>
               <xsd:element name="aliases" type="wfs-kvp:CommaSeparatedList"/>
               <xsd:choice>
                  <xsd:element name="filter" type="xsd:string"/>
                  <xsd:element name="bbox" type="wfs-kvp:BBoxType"/>
               </xsd:choice>
            </xsd:sequence>
         </xsd:choice>
         <xsd:element name="sortby" type="xsd:string" minOccurs="0"/>
         <xsd:element name="resolve" type="wfs-kvp:ResolveValueType"
            minOccurs="0" default="none"/>
         <xsd:element name="resolvePath" type="xsd:string" minOccurs="0"
            default="none"/>
         <xsd:element name="resolveDepth" type="xsd:string" minOccurs="0"
            default="*"/>
         <xsd:element name="resolveTimeout" type="xsd:positiveInteger"
            minOccurs="0" default="300"/>
         <xsd:element name="namespace" type="wfs-kvp:CommaSeparatedList"
            minOccurs="0"/>
      </xsd:sequence>
   </xsd:complexType>
   <!-- GETFEATUREWITHLOCK TYPE DEFINITION ================================ -->
   <xsd:complexType name="GetFeatureWithLockRequestType">
      <xsd:sequence>
         <xsd:element name="service" type="xsd:string" minOccurs="1"
            maxOccurs="1" fixed="WFS"/>
         <xsd:element name="version" type="xsd:string" minOccurs="1"
            maxOccurs="1" fixed="2.0.0"/>
         <xsd:element name="request" type="xsd:string" minOccurs="1"
            maxOccurs="1" fixed="GetFeatureWithLock"/>
         <xsd:element name="outputFormat" type="xsd:string" minOccurs="0"
            default="application/gml+xml; version=3.2"/>
         <xsd:element name="count" type="xsd:positiveInteger"
            minOccurs="0"/>
         <xsd:element name="resulttype" minOccurs="0" default="results">
            <xsd:simpleType>
               <xsd:restriction base="xsd:string">
                  <xsd:enumeration value="results"/>
                  <xsd:enumeration value="hits"/>
               </xsd:restriction>
            </xsd:simpleType>
         </xsd:element>
         <xsd:element name="expiry" type="xsd:positiveInteger" minOccurs="0"/>
         <xsd:element name="featureversion" type="wfs-kvp:All_N_ValueType"
            minOccurs="0"/>
         <xsd:element name="srsname" type="xsd:anyURI" minOccurs="0"/>
         <xsd:element name="propertyname" type="wfs-kvp:CommaSeparatedList"
            minOccurs="0"/>
         <xsd:choice>
            <xsd:element name="resourceid" type="wfs-kvp:CommaSeparatedList"/>
            <xsd:sequence>
               <xsd:element name="typenames" type="wfs-kvp:CommaSeparatedList"/>
               <xsd:element name="aliases" type="wfs-kvp:CommaSeparatedList"/>
               <xsd:choice>
                  <xsd:element name="filter" type="xsd:string"/>
                  <xsd:element name="bbox" type="wfs-kvp:BBoxType"/>
               </xsd:choice>
            </xsd:sequence>
         </xsd:choice>
         <xsd:element name="sortby" type="xsd:string" minOccurs="0"/>
         <xsd:element name="resolve" type="wfs-kvp:ResolveValueType"
            minOccurs="0" default="none"/>
         <xsd:element name="resolvePath" type="xsd:string" minOccurs="0"
            default="none"/>
         <xsd:element name="resolveDepth" type="xsd:string" minOccurs="0"
            default="*"/>
         <xsd:element name="resolveTimeout" type="xsd:positiveInteger"
            minOccurs="0" default="300"/>
         <xsd:element name="namespace" type="wfs-kvp:CommaSeparatedList"
            minOccurs="0"/>
      </xsd:sequence>
   </xsd:complexType>
   <!-- LOCKFEATURERE TYPE DEFINITION ===================================== -->
   <xsd:complexType name="LockFeatureRequestType">
      <xsd:sequence>
         <xsd:element name="service" type="xsd:string" minOccurs="1"
            maxOccurs="1" fixed="WFS"/>
         <xsd:element name="version" type="xsd:string" minOccurs="1"
            maxOccurs="1" fixed="2.0.0"/>
         <xsd:element name="request" type="xsd:string" minOccurs="1"
            maxOccurs="1" fixed="LockFeature"/>
         <xsd:element name="lockaction" type="wfs-kvp:All_Some_ValueType"
            minOccurs="0"/>
         <xsd:element name="expiry" type="xsd:positiveInteger" minOccurs="0"/>
         <xsd:choice>
            <xsd:element name="resourceid" type="wfs-kvp:CommaSeparatedList"/>
            <xsd:sequence>
               <xsd:element name="typenames" type="wfs-kvp:CommaSeparatedList"/>
               <xsd:choice>
                  <xsd:element name="filter" type="xsd:string"/>
                  <xsd:element name="bbox" type="wfs-kvp:BBoxType"/>
               </xsd:choice>
            </xsd:sequence>
         </xsd:choice>
         <xsd:element name="namespace" type="wfs-kvp:CommaSeparatedList"
            minOccurs="0"/>
      </xsd:sequence>
   </xsd:complexType>
   <!-- LISTSTOREDQUERIES TYPE DEFINITION ================================= -->
   <xsd:complexType name="ListStoredQueriesRequestType">
      <xsd:sequence>
         <xsd:element name="service" type="xsd:string" minOccurs="1"
            maxOccurs="1" fixed="WFS"/>
         <xsd:element name="version" type="xsd:string" minOccurs="1"
            maxOccurs="1" fixed="2.0.0"/>
         <xsd:element name="request" type="xsd:string" minOccurs="1"
            maxOccurs="1" fixed="ListStoredQueries"/>
         <xsd:element name="namespace" type="wfs-kvp:CommaSeparatedList"
            minOccurs="0"/>
      </xsd:sequence>
   </xsd:complexType>
   <!-- DESCRIBESTOREDQUERIES TYPE DEFINITION ============================= -->
   <xsd:complexType name="DescribeStoredQueriesRequestType">
      <xsd:sequence>
         <xsd:element name="service" type="xsd:string" minOccurs="1"
            maxOccurs="1" fixed="WFS"/>
         <xsd:element name="version" type="xsd:string" minOccurs="1"
            maxOccurs="1" fixed="2.0.0"/>
         <xsd:element name="request" type="xsd:string" minOccurs="1"
            maxOccurs="1" fixed="DescribeStoredQueries"/>
         <xsd:element name="storedQueryId" type="wfs-kvp:CommaSeparatedList"
            minOccurs="0"/>
         <xsd:element name="namespace" type="wfs-kvp:CommaSeparatedList"
            minOccurs="0"/>
      </xsd:sequence>
   </xsd:complexType>
   
   <!-- DROPSTOREDQUERY TYPE DEFINITION ============================= -->
   <xsd:complexType name="DropStoredQueryRequestType">
      <xsd:sequence>
         <xsd:element name="service" type="xsd:string" minOccurs="1"
            maxOccurs="1" fixed="WFS"/>
         <xsd:element name="version" type="xsd:string" minOccurs="1"
            maxOccurs="1" fixed="2.0.0"/>
         <xsd:element name="request" type="xsd:string" minOccurs="1"
            maxOccurs="1" fixed="DropStoredQuery"/>
         <xsd:element name="storedQueryId" type="xsd:string" maxOccurs="1"
            minOccurs="1"/>
         <xsd:element name="namespace" type="wfs-kvp:CommaSeparatedList"
            minOccurs="0"/>
      </xsd:sequence>
   </xsd:complexType>
   
   <xsd:element name="GetCapabilities"
                type="wfs-kvp:GetCapabilitiesType"/>
   <xsd:element name="DescribeFeatureType"
                type="wfs-kvp:DescribeFeatureTypeRequestType"/>
   <xsd:element name="GetPropertyValue"
                type="wfs-kvp:GetPropertyValueRequestType"/>
   <xsd:element name="GetFeature"
                type="wfs-kvp:GetFeatureRequestType"/>
   <xsd:element name="GetFeatureWithLock"
                type="wfs-kvp:GetFeatureRequestType"/>
   <xsd:element name="LockFeature"
                type="wfs-kvp:LockFeatureRequestType"/>
   <xsd:element name="ListStoredQueries"
                type="wfs-kvp:ListStoredQueriesRequestType"/>
   <xsd:element name="DescribeStoredQueries"
                type="wfs-kvp:DescribeStoredQueriesRequestType"/>
   <xsd:element name="DropStoredQuery"
                type="wfs-kvp:DropStoredQueryRequestType"/>      
</xsd:schema>
